<nz-modal [(nzVisible)]="isVisible" [nzWidth]="modalWidth" (nzOnCancel)="onBack()" [nzStyle]="{'top': '50px'}">
  <div *nzModalTitle>{{ title }}</div>
  <ng-container *nzModalContent>
    <form [formGroup]="educationForm" (keydown.enter)="$event.preventDefault()">
      <nz-row [nzGutter]="10">
        <nz-col [nzSpan]="12">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="employeeName" nzRequired>员工姓名</nz-form-label>
            <nz-form-control [nzErrorTip]="'请选择员工姓名'">
              <nz-input-group nzSearch [nzAddOnAfter]="employeeNameSuffixIconButton">
                <input nz-input formControlName="employeeName" placeholder="请选择员工姓名" readonly />
              </nz-input-group>
              <ng-template #employeeNameSuffixIconButton>
                <button nz-button nzType="primary" nzSearch (click)="findEmployee()"><nz-icon nzType="search" /></button>
              </ng-template>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
        <nz-col [nzSpan]="12">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="schoolName" nzRequired>学校名称</nz-form-label>
            <nz-form-control [nzErrorTip]="'请输入学校名称'">
              <input nz-input formControlName="schoolName" placeholder="请输入学校名称" maxlength="255"/>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
      </nz-row>
      <nz-row [nzGutter]="10">
        <nz-col [nzSpan]="12">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="degree" nzRequired>学历</nz-form-label>
            <nz-form-control [nzErrorTip]="'请选择学历'">
              <nz-select formControlName="degree">
                <nz-option nzLabel="初中" [nzValue]="10"></nz-option>
                <nz-option nzLabel="高中" [nzValue]="20"></nz-option>
                <nz-option nzLabel="本科" [nzValue]="30"></nz-option>
                <nz-option nzLabel="硕士研究生" [nzValue]="40"></nz-option>
                <nz-option nzLabel="博士研究生" [nzValue]="50"></nz-option>
              </nz-select>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
        <nz-col [nzSpan]="12">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="startDate">开始日期</nz-form-label>
            <nz-form-control >
              <nz-date-picker formControlName="startDate" nzFormat="yyyy-MM-dd"></nz-date-picker>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
      </nz-row>
      <nz-row [nzGutter]="10">
        <nz-col [nzSpan]="12">
          <nz-form-item>
            <nz-form-label [nzSpan]="6" nzFor="endDate">结束日期</nz-form-label>
            <nz-form-control >
              <nz-date-picker formControlName="endDate" nzFormat="yyyy-MM-dd"></nz-date-picker>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
      </nz-row>
    </form>
  </ng-container>
  <div *nzModalFooter>
    <div class="form-button-container">
      <button nz-button nzType="primary" (click)="onSave()" [nzLoading]="saveLoading">保存</button>
      <button nz-button nzType="default" (click)="onReset()" [nzLoading]="saveLoading">重置</button>
      <button nz-button nzType="default" (click)="onBack()">关闭</button>
    </div>
  </div>
</nz-modal>
<employee-selector (employeeSelectedEvent)="handleEmployeeSelectedEvent($event)"></employee-selector>
